package org.dromara.quick.chat.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
import org.dromara.quick.chat.domain.ImGroupChat;
import org.dromara.quick.chat.model.bo.query.ImGroupChatBo;
import org.dromara.quick.chat.model.vo.GroupChatUserInfoVO;
import org.dromara.quick.chat.model.vo.ImGroupChatDetailVO;
import org.dromara.quick.chat.model.vo.ImGroupChatVO;

/**
* @author Stars
* @description 针对表【im_group_chat(群聊表（群通讯录），记录群聊的相关信息及设置)】的数据库操作Mapper
* @createDate 2025-03-04 22:33:21
* @Entity org.dromara.quick.chat.domain.ImGroupChat
*/
public interface ImGroupChatMapper extends BaseMapperPlus<ImGroupChat, ImGroupChatVO> {


    /**
     * 聊天框-查询群基本信息
     * @param groupId 群id
     * @param userId 用户id
     * @return
     */
    GroupChatUserInfoVO selectGroupChatInfo(@Param("groupId") Long groupId, @Param("userId") Long userId);

    /***
     * 查询群通讯录列表
     */
    IPage<ImGroupChatVO> selectImGroupChatList(Page<ImGroupChat> page, @Param("imGroupChatBo") ImGroupChatBo imGroupChatBo);


    /**
     * 根据群id、群号查询
     * @param id
     * @param groupNumber
     * @return
     */
    ImGroupChatDetailVO selectImGroupChatDetail(@Param("id") Long id, @Param("groupNumber") String groupNumber,@Param("userId") Long userId);

}




